package com.qpl.depression.service.impl;

import com.qpl.depression.entity.Book;
import com.qpl.depression.repository.BookRepository;
import com.qpl.depression.service.BookService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author qpl
 * @since 2021-04-20
 */
@Service
public class BookServiceImpl extends ServiceImpl<BookRepository, Book> implements BookService {
    @Autowired
    private BookRepository bookRepository;

    /**
     * 查询一个书籍推荐到首页
     *
     * @return 书籍信息
     */
    @Override
    public Book selectOne() {
        return bookRepository.getOne();
    }
}
